package exception;

import org.junit.Test;

/**
 * @author 帅小伙
 * @date 2022/1/29
 * @description
 */
public class TryCatchFinallyTest {


    public static void main(String[] args) {
        System.out.println(10%3*2);
        System.out.println(test1());
    }





    static int test1() {

        try {
            System.out.println("try执行");
            int a = 1 / 0;
           // return 1;
        } catch (Exception e) {
            System.out.println("异常执行");
            e.printStackTrace();
            return 2;
        } finally {
            System.out.println("finally执行");
        }
        return 3;
    }



}
